package us.wili.dev.client.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties(ignoreUnknownFields = false, prefix = "app")
public class AppConfig {


    private String scheme;
    private String domain;

    public String getScheme() {
        return scheme;
    }

    public void setScheme(String scheme) {
        this.scheme = scheme;
    }

    public String getDomain() {
        return domain;
    }

    public void setDomain(String domain) {
        this.domain = domain;
    }

    public String getRootPath() {
        return scheme + domain;
    }

    public String getBasePath() {
        return String.format("%s://%s", scheme, domain);
    }

    public String getSecurityCodePath() {
        return String.format("%s/%s", getBasePath(), "/pf-api/admin/loginCaptcha");
    }
}
